namespace FileDirUtils
{
    public interface IFilter
    {            
        bool Match(string s);
    }

    public class FilterDecorator : IFilter
    {
        private IFilter decorator;
        public FilterDecorator()
        {            
        }
        public FilterDecorator(IFilter decorator)
        {
            this.decorator = decorator;
        }

        public bool Match(string s)
        {
            if (!this.Match((s)))
                return false;
            return (decorator == null) ? true : decorator.Match(s);
        }
    }
}